<template>
    <div class="service">

        <h2>联系客服</h2>
        <!-- <div class="contact">
            <p>客服微信：{{tel}}</p>
        </div>
	   <button type="button"
      v-clipboard:copy="tel"
      v-clipboard:success="onCopy"
      v-clipboard:error="onError" class="copy">复制客服微信号</button> -->

	<toast :text="text" v-model="isShow"></toast>
    </div>
</template>
<script>
import FormPreview from "vux/src/components/form-preview/";
import Toast from 'vux/src/components/toast/'

export default {
  components: {
    FormPreview
  },
  methods: {
	onCopy: function (e) {
		this.isShow = true
		this.text = '复制成功'
	},
	onError: function (e) {
		this.isShow = true
		this.text = '复制失败'
	}
  },
  data() {
    return {
		tel: "17127358113",
		isShow: false,
		text:''
    };
  },
  components:{
	  Toast
  }
};
</script>
<style lang="scss" scoped>
@import "../../../../assets/css/all";
input,textarea {border: none;-webkit-appearance: none;background: none;}
.service {@include screen;min-height: 100%;overflow-y: auto;background-color: white;

  h2 {color: #555;padding: 5px 0px 5px 15px;font-size: 18px;border-bottom: 1px solid #cccccc;margin-top: 10px;}

  .copy{background-color: #1AAD19;color:white;line-height: 40px;border:none;padding:0 15px;border-radius: 4px;font-size: 16px;margin:0 auto;display: block;margin-top:100px;box-shadow: 0 4px 20px #1AAD19;}
  .contact {text-align: center;margin-top: 20px;line-height: 45px;border:1px solid #f5f5f5; }
}
</style>

